﻿using UnityEngine;
using System.Collections;

public class PlayerReset : MonoBehaviour 
{
	public GameObject respawnPoint;
	private GameObject player;
	
	void Awake()
	{
		player = GameObject.FindGameObjectWithTag ("Player");
	}
	
	void OnTriggerEnter(Collider other)
	{
		if (other.gameObject.CompareTag("Player"))
		{
			player.transform.position = respawnPoint.transform.position;
		}
	}
}
